Alu-Index
A-G clean signal
#Leukocytes (GSE157103) Nasal Swabs (GSE166530) Whole Blood (GSE167000) Whole Blood (GSE171110)
edit_type_names <- c("A2GEditingIndex_Alu" = "A-G\n(T-C)", "A2TEditingIndex_Alu" = "A-T\n(T-A)",
"C2AEditingIndex_Alu" = "C-A\n(G-T)", "C2TEditingIndex_Alu" = "C-T\n(G-A)",
"C2GEditingIndex_Alu" = "C-G\n(G-C)", "A2CEditingIndex_Alu" = "A-C\n(T-G)")
plot_GSE157103.Mismatches <-
df_combined %>%
filter(Project =="Leukocytes (GSE157103)") %>%
dplyr::select("Run", "Project",
"A2GEditingIndex_Alu","A2TEditingIndex_Alu",
"C2AEditingIndex_Alu","C2TEditingIndex_Alu",
"C2GEditingIndex_Alu","A2CEditingIndex_Alu") %>%
gather(edit_type, value, -Run, -Project) %>%
ggplot(aes(y=value, x=edit_type ,fill=edit_type))+
geom_boxplot(aes(fill=edit_type)) +
themes_ggplot+
facet_grid(~Project)+
# theme(axis.text.x = element_text(angle = 90))+
ylab("ALU Editing Index")+ xlab ("Nucleotide mismatch")+
scale_fill_discrete(name = "Mistmatch:")+
theme(axis.title.x = element_blank())+ theme(legend.position = "none") +
scale_fill_manual(values=c("yellow", "red", "blue", "green", "orange", "black"))+
scale_x_discrete(labels= edit_type_names)
## Scale for 'fill' is already present. Adding another scale for 'fill', which
## will replace the existing scale.
plot_GSE157103.Mismatches

#Leukocytes (GSE157103) Nasal Swabs (GSE166530) Whole Blood (GSE167000) Whole Blood (GSE171110)
plot_GSE166530.Mismatches <-
df_combined %>%
filter(Project =="Nasal Swabs (GSE166530)") %>%
dplyr::select("Run", "Project",
"A2GEditingIndex_Alu","A2TEditingIndex_Alu",
"C2AEditingIndex_Alu","C2TEditingIndex_Alu",
"C2GEditingIndex_Alu","A2CEditingIndex_Alu") %>%
gather(edit_type, value, -Run, -Project) %>%
ggplot(aes(y=value, x=edit_type ,fill=edit_type))+
geom_boxplot(aes(fill=edit_type)) +
themes_ggplot+
facet_grid(~Project)+
# theme(axis.text.x = element_text(angle = 90))+
ylab("ALU Editing Index")+ xlab ("Nucleotide mismatch")+
scale_fill_discrete(name = "Mistmatch:")+
theme(axis.title.x = element_blank())+ theme(legend.position = "none") +
scale_fill_manual(values=c("yellow", "red", "blue", "green", "orange", "black"))+
scale_x_discrete(labels= edit_type_names)
## Scale for 'fill' is already present. Adding another scale for 'fill', which
## will replace the existing scale.
plot_GSE166530.Mismatches

#Leukocytes (GSE157103) Nasal Swabs (GSE166530) Whole Blood (GSE167000) Whole Blood (GSE171110)
plot_GSE167000.Mismatches <-
df_combined %>%
filter(Project =="Whole Blood (GSE167000)") %>%
dplyr::select("Run", "Project",
"A2GEditingIndex_Alu","A2TEditingIndex_Alu",
"C2AEditingIndex_Alu","C2TEditingIndex_Alu",
"C2GEditingIndex_Alu","A2CEditingIndex_Alu") %>%
gather(edit_type, value, -Run, -Project) %>%
ggplot(aes(y=value, x=edit_type ,fill=edit_type))+
geom_boxplot(aes(fill=edit_type)) +
themes_ggplot+
facet_grid(~Project)+
# theme(axis.text.x = element_text(angle = 90))+
ylab("ALU Editing Index")+ xlab ("Nucleotide mismatch")+
scale_fill_discrete(name = "Mistmatch:")+
theme(axis.title.x = element_blank())+ theme(legend.position = "none") +
scale_fill_manual(values=c("yellow", "red", "blue", "green", "orange", "black"))+
scale_x_discrete(labels= edit_type_names)
## Scale for 'fill' is already present. Adding another scale for 'fill', which
## will replace the existing scale.
plot_GSE167000.Mismatches

#Leukocytes (GSE157103) Nasal Swabs (GSE166530) Whole Blood (GSE167000) Whole Blood (GSE171110)
plot_GSE171110.Mismatches <-
df_combined %>%
filter(Project =="Whole Blood (GSE171110)") %>%
dplyr::select("Run", "Project",
"A2GEditingIndex_Alu","A2TEditingIndex_Alu",
"C2AEditingIndex_Alu","C2TEditingIndex_Alu",
"C2GEditingIndex_Alu","A2CEditingIndex_Alu") %>%
gather(edit_type, value, -Run, -Project) %>%
ggplot(aes(y=value, x=edit_type ,fill=edit_type))+
geom_boxplot(aes(fill=edit_type)) +
themes_ggplot+
facet_grid(~Project)+
# theme(axis.text.x = element_text(angle = 90))+
ylab("ALU Editing Index")+ xlab ("Nucleotide mismatch")+
scale_fill_discrete(name = "Mistmatch:")+
theme(axis.title.x = element_blank())+ theme(legend.position = "none") +
scale_fill_manual(values=c("yellow", "red", "blue", "green", "orange", "black"))+
scale_x_discrete(labels= edit_type_names)
## Scale for 'fill' is already present. Adding another scale for 'fill', which
## will replace the existing scale.
plot_GSE171110.Mismatches

#Leukocytes (GSE157103) Nasal Swabs (GSE166530) Whole Blood (GSE167000) Whole Blood (GSE171110)
plot_grid(plot_GSE166530.Mismatches,
plot_GSE167000.Mismatches,
plot_GSE171110.Mismatches,
plot_GSE157103.Mismatches,
labels = c('', '','',''), label_size = 12, ncol=4)

out_path <- paste0(OUT_DIR,'/',"AluIndex_all_cleanSignal.pdf")
ggsave(out_path, width = 18, height = 6)
Alu-Index
#Leukocytes (GSE157103) Nasal Swabs (GSE166530) Whole Blood (GSE167000) Whole Blood (GSE171110)
y_position = max(df_combined%>%
filter(Project =="Leukocytes (GSE157103)") %>% .$A2GEditingIndex_Alu)
c <- df_combined %>%
filter(Project =="Leukocytes (GSE157103)") %>%
compare_means(A2GEditingIndex_Alu ~Group, data = .)
c %<>% mutate(y_pos = c(y_position *1),
labels = ifelse(p < 0.05, sprintf("%2.1e",p),p))
# c <- c[c(1,3,2),] #reorder manually sorry
c$p.adj.format <- c$p.adj
c$p.adj.format[c$p.adj < 2e-16] <- "< 2e-16"
c$p.adj.format[as.numeric(c$p.adj) > 0.1] <- "N.S"
c$p.adj.format.stars <- c$p.adj
c$p.adj.format.stars[c$p.adj >= 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.05] <- paste0("* (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.01] <- paste0("** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.001] <- paste0("*** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 2e-16] <- paste0("**** (p=", c$p.adj,")")
df_c <- as.data.frame(c)
plot_GSE157103 <-
df_combined %>%
filter(Project =="Leukocytes (GSE157103)") %>%
ggplot(
aes(y=A2GEditingIndex_Alu, x=Group))+
geom_boxplot(aes(fill=Group)) + geom_jitter( size=2, alpha = 0.2)+
facet_grid( ~ Project , drop = TRUE, scales = "free", space = "free",)+
themes_ggplot+ ylab("ALU Editing Index")+ xlab ("Group")+ scale_fill_discrete(name = "Group:")+
expand_limits(y = 0) + scale_fill_manual(values=c("blue","red"))+
theme(axis.title.x = element_blank())+ theme(legend.position = "none")+
geom_signif(data = df_c,
aes(xmin=group1, xmax=group2, annotations=p.adj.format.stars, y_position=y_pos),manual = TRUE)
## Scale for 'fill' is already present. Adding another scale for 'fill', which
## will replace the existing scale.
## Warning: Ignoring unknown aesthetics: xmin, xmax, annotations, y_position
plot_GSE157103

#Leukocytes (GSE157103) Nasal Swabs (GSE166530) Whole Blood (GSE167000) Whole Blood (GSE171110)
y_position = max(df_combined%>%
filter(Project =="Nasal Swabs (GSE166530)") %>% .$A2GEditingIndex_Alu)
c <- df_combined %>%
filter(Project =="Nasal Swabs (GSE166530)") %>%
compare_means(A2GEditingIndex_Alu ~Group, data = .)
c %<>% mutate(y_pos = c(y_position *1),
labels = ifelse(p < 0.05, sprintf("%2.1e",p),p))
# c <- c[c(1,3,2),] #reorder manually sorry
c$p.adj.format <- c$p.adj
c$p.adj.format[c$p.adj < 2e-16] <- "< 2e-16"
c$p.adj.format[as.numeric(c$p.adj) > 0.1] <- "N.S"
c$p.adj.format.stars <- c$p.adj
c$p.adj.format.stars[c$p.adj >= 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.05] <- paste0("* (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.01] <- paste0("** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.001] <- paste0("*** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 2e-16] <- paste0("**** (p=", c$p.adj,")")
df_c <- as.data.frame(c)
plot_GSE166530 <-
df_combined %>%
filter(Project =="Nasal Swabs (GSE166530)") %>%
ggplot(
aes(y=A2GEditingIndex_Alu, x=Group))+
geom_boxplot(aes(fill=Group)) + geom_jitter( size=2, alpha = 0.2)+
facet_grid( ~ Project , drop = TRUE, scales = "free", space = "free",)+
themes_ggplot+ ylab("ALU Editing Index")+ xlab ("Group")+ scale_fill_discrete(name = "Group:")+
expand_limits(y = 0) + scale_fill_manual(values=c("blue","red"))+
theme(axis.title.x = element_blank())+ theme(legend.position = "none")+
geom_signif(data = df_c,
aes(xmin=group1, xmax=group2, annotations=p.adj.format.stars, y_position=y_pos),manual = TRUE)
## Scale for 'fill' is already present. Adding another scale for 'fill', which
## will replace the existing scale.
## Warning: Ignoring unknown aesthetics: xmin, xmax, annotations, y_position
plot_GSE166530

#Leukocytes (GSE157103) Nasal Swabs (GSE166530) Whole Blood (GSE167000) Whole Blood (GSE171110)
y_position = max(df_combined%>%
filter(Project =="Whole Blood (GSE167000)") %>% .$A2GEditingIndex_Alu)
c <- df_combined %>%
filter(Project =="Whole Blood (GSE167000)") %>%
compare_means(A2GEditingIndex_Alu ~Group, data = .)
c %<>% mutate(y_pos = c(y_position *1),
labels = ifelse(p < 0.05, sprintf("%2.1e",p),p))
# c <- c[c(1,3,2),] #reorder manually sorry
c$p.adj.format <- c$p.adj
c$p.adj.format[c$p.adj < 2e-16] <- "< 2e-16"
c$p.adj.format[as.numeric(c$p.adj) > 0.1] <- "N.S"
c$p.adj.format.stars <- c$p.adj
c$p.adj.format.stars[c$p.adj >= 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.05] <- paste0("* (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.01] <- paste0("** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.001] <- paste0("*** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 2e-16] <- paste0("**** (p=", c$p.adj,")")
df_c <- as.data.frame(c)
plot_GSE167000 <-
df_combined %>%
filter(Project =="Whole Blood (GSE167000)") %>%
ggplot(
aes(y=A2GEditingIndex_Alu, x=Group))+
geom_boxplot(aes(fill=Group)) + geom_jitter( size=2, alpha = 0.2)+
facet_grid( ~ Project , drop = TRUE, scales = "free", space = "free",)+
themes_ggplot+ ylab("ALU Editing Index")+ xlab ("Group")+ scale_fill_discrete(name = "Group:")+
expand_limits(y = 0) + scale_fill_manual(values=c("blue","red"))+
theme(axis.title.x = element_blank())+ theme(legend.position = "none")+
geom_signif(data = df_c,
aes(xmin=group1, xmax=group2, annotations=p.adj.format.stars, y_position=y_pos),manual = TRUE)
## Scale for 'fill' is already present. Adding another scale for 'fill', which
## will replace the existing scale.
## Warning: Ignoring unknown aesthetics: xmin, xmax, annotations, y_position
plot_GSE167000

#Leukocytes (GSE157103) Nasal Swabs (GSE166530) Whole Blood (GSE167000) Whole Blood (GSE171110)
y_position = max(df_combined%>%
filter(Project =="Whole Blood (GSE171110)") %>% .$A2GEditingIndex_Alu)
c <- df_combined %>%
filter(Project =="Whole Blood (GSE171110)") %>%
compare_means(A2GEditingIndex_Alu ~Group, data = .)
c %<>% mutate(y_pos = c(y_position *1),
labels = ifelse(p < 0.05, sprintf("%2.1e",p),p))
# c <- c[c(1,3,2),] #reorder manually sorry
c$p.adj.format <- c$p.adj
c$p.adj.format[c$p.adj < 2e-16] <- "< 2e-16"
c$p.adj.format[as.numeric(c$p.adj) > 0.1] <- "N.S"
c$p.adj.format.stars <- c$p.adj
c$p.adj.format.stars[c$p.adj >= 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.05] <- paste0("* (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.01] <- paste0("** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.001] <- paste0("*** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 2e-16] <- paste0("**** (p=", c$p.adj,")")
df_c <- as.data.frame(c)
plot_GSE171110 <-
df_combined %>%
filter(Project =="Whole Blood (GSE171110)") %>%
ggplot(
aes(y=A2GEditingIndex_Alu, x=Group))+
geom_boxplot(aes(fill=Group)) + geom_jitter( size=2, alpha = 0.2)+
facet_grid( ~ Project , drop = TRUE, scales = "free", space = "free",)+
themes_ggplot+ ylab("ALU Editing Index")+ xlab ("Group")+ scale_fill_discrete(name = "Group:")+
expand_limits(y = 0) + scale_fill_manual(values=c("blue","red"))+
theme(axis.title.x = element_blank())+ theme(legend.position = "none")+
geom_signif(data = df_c,
aes(xmin=group1, xmax=group2, annotations=p.adj.format.stars, y_position=y_pos),manual = TRUE)
## Scale for 'fill' is already present. Adding another scale for 'fill', which
## will replace the existing scale.
## Warning: Ignoring unknown aesthetics: xmin, xmax, annotations, y_position
plot_GSE171110

plot_grid(plot_GSE166530, plot_GSE167000, plot_GSE171110, plot_GSE157103,
labels = c('', '','',''), label_size = 12, ncol=4)

out_path <- paste0(OUT_DIR,'/',"AluEditing_all_combined.pdf")
ggsave(out_path, width = 14, height = 6)
SALMON
Leukocytes (GSE157103)
#Leukocytes (GSE157103) Nasal Swabs (GSE166530) Whole Blood (GSE167000) Whole Blood (GSE171110)
y_position = max(df_combined%>%
filter(Project =="Leukocytes (GSE157103)") %>% .$ADAR)
c <- df_combined %>%
filter(Project =="Leukocytes (GSE157103)") %>%
compare_means(ADAR ~Group, data = .)
c %<>% mutate(y_pos = c(y_position *1),
labels = ifelse(p < 0.05, sprintf("%2.1e",p),p))
# c <- c[c(1,3,2),] #reorder manually sorry
c$p.adj.format <- c$p.adj
c$p.adj.format[c$p.adj < 2e-16] <- "< 2e-16"
c$p.adj.format[as.numeric(c$p.adj) > 0.1] <- "N.S"
c$p.adj.format.stars <- c$p.adj
c$p.adj.format.stars[c$p.adj >= 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.05] <- paste0("* (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.01] <- paste0("** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.001] <- paste0("*** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 2e-16] <- paste0("**** (p=", c$p.adj,")")
df_c <- as.data.frame(c)
plot_GSE157103.ADAR <-
df_combined %>%
filter(Project =="Leukocytes (GSE157103)") %>%
ggplot(
aes(y=ADAR, x=Group))+
geom_boxplot(aes(fill=Group)) + geom_jitter( size=2, alpha = 0.2)+
# facet_grid( ~ Project , drop = TRUE, scales = "free", space = "free",)+
themes_ggplot+ ylab("Normalized Expression (TPM)")+ xlab ("Group")+ scale_fill_discrete(name = "Group:")+
expand_limits(y = 0) + scale_fill_manual(values=c("blue","red"))+
theme(axis.title.x = element_blank())+ theme(legend.position = "none")+
geom_signif(data = df_c,
aes(xmin=group1, xmax=group2, annotations=p.adj.format.stars, y_position=y_pos),manual = TRUE)
## Scale for 'fill' is already present. Adding another scale for 'fill', which
## will replace the existing scale.
## Warning: Ignoring unknown aesthetics: xmin, xmax, annotations, y_position
plot_GSE157103.ADAR

#Leukocytes (GSE157103) Nasal Swabs (GSE166530) Whole Blood (GSE167000) Whole Blood (GSE171110)
y_position = max(df_combined%>%
filter(Project =="Leukocytes (GSE157103)") %>% .$ADARB1)
c <- df_combined %>%
filter(Project =="Leukocytes (GSE157103)") %>%
compare_means(ADARB1 ~Group, data = .)
c %<>% mutate(y_pos = c(y_position *1),
labels = ifelse(p < 0.05, sprintf("%2.1e",p),p))
# c <- c[c(1,3,2),] #reorder manually sorry
c$p.adj.format <- c$p.adj
c$p.adj.format[c$p.adj < 2e-16] <- "< 2e-16"
c$p.adj.format[as.numeric(c$p.adj) > 0.1] <- "N.S"
c$p.adj.format.stars <- c$p.adj
c$p.adj.format.stars[c$p.adj >= 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.05] <- paste0("* (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.01] <- paste0("** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.001] <- paste0("*** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 2e-16] <- paste0("**** (p=", c$p.adj,")")
df_c <- as.data.frame(c)
plot_GSE157103.ADARB1 <-
df_combined %>%
filter(Project =="Leukocytes (GSE157103)") %>%
ggplot(
aes(y=ADARB1, x=Group))+
geom_boxplot(aes(fill=Group)) + geom_jitter( size=2, alpha = 0.2)+
# facet_grid( ~ Project , drop = TRUE, scales = "free", space = "free",)+
themes_ggplot+ ylab("Normalized Expression (TPM)")+ xlab ("Group")+ scale_fill_discrete(name = "Group:")+
expand_limits(y = 0) + scale_fill_manual(values=c("blue","red"))+
theme(axis.title.x = element_blank())+ theme(legend.position = "none")+
geom_signif(data = df_c,
aes(xmin=group1, xmax=group2, annotations=p.adj.format.stars, y_position=y_pos),manual = TRUE)
## Scale for 'fill' is already present. Adding another scale for 'fill', which
## will replace the existing scale.
## Warning: Ignoring unknown aesthetics: xmin, xmax, annotations, y_position
plot_GSE157103.ADARB1

#Leukocytes (GSE157103) Nasal Swabs (GSE166530) Whole Blood (GSE167000) Whole Blood (GSE171110)
y_position = max(df_combined%>%
filter(Project =="Leukocytes (GSE157103)") %>% .$ADARB2)
c <- df_combined %>%
filter(Project =="Leukocytes (GSE157103)") %>%
compare_means(ADARB2 ~Group, data = .)
c %<>% mutate(y_pos = c(y_position *1),
labels = ifelse(p < 0.05, sprintf("%2.1e",p),p))
# c <- c[c(1,3,2),] #reorder manually sorry
c$p.adj.format <- c$p.adj
c$p.adj.format[c$p.adj < 2e-16] <- "< 2e-16"
c$p.adj.format[as.numeric(c$p.adj) > 0.1] <- "N.S"
c$p.adj.format.stars <- c$p.adj
c$p.adj.format.stars[c$p.adj >= 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.05] <- paste0("* (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.01] <- paste0("** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.001] <- paste0("*** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 2e-16] <- paste0("**** (p=", c$p.adj,")")
df_c <- as.data.frame(c)
plot_GSE157103.ADARB2 <-
df_combined %>%
filter(Project =="Leukocytes (GSE157103)") %>%
ggplot(
aes(y=ADARB2, x=Group))+
geom_boxplot(aes(fill=Group)) + geom_jitter( size=2, alpha = 0.2)+
# facet_grid( ~ Project , drop = TRUE, scales = "free", space = "free",)+
themes_ggplot+ ylab("Normalized Expression (TPM)")+ xlab ("Group")+ scale_fill_discrete(name = "Group:")+
expand_limits(y = 0) + scale_fill_manual(values=c("blue","red"))+
theme(axis.title.x = element_blank())+ theme(legend.position = "none")+
geom_signif(data = df_c,
aes(xmin=group1, xmax=group2, annotations=p.adj.format.stars, y_position=y_pos),manual = TRUE)
## Scale for 'fill' is already present. Adding another scale for 'fill', which
## will replace the existing scale.
## Warning: Ignoring unknown aesthetics: xmin, xmax, annotations, y_position
plot_GSE157103.ADARB2

plot_grid(plot_GSE157103.ADAR+facet_grid(~"ADAR"),
plot_GSE157103.ADARB1+facet_grid(~"ADAR2"),
plot_GSE157103.ADARB2+facet_grid(~"ADAR3"),
labels = c('', '',''), label_size = 12, ncol=4)

out_path <- paste0(OUT_DIR,'/',"SALMON_Leukocytes_GSE157103.pdf")
ggsave(out_path, width = 14, height = 6)
#Leukocytes (GSE157103) Nasal Swabs (GSE166530) Whole Blood (GSE167000) Whole Blood (GSE171110)
y_position = max(df_combined%>%
filter(Project =="Nasal Swabs (GSE166530)") %>% .$A2GEditingIndex_Alu)
c <- df_combined %>%
filter(Project =="Nasal Swabs (GSE166530)") %>%
compare_means(A2GEditingIndex_Alu ~Group, data = .)
c %<>% mutate(y_pos = c(y_position *1),
labels = ifelse(p < 0.05, sprintf("%2.1e",p),p))
# c <- c[c(1,3,2),] #reorder manually sorry
c$p.adj.format <- c$p.adj
c$p.adj.format[c$p.adj < 2e-16] <- "< 2e-16"
c$p.adj.format[as.numeric(c$p.adj) > 0.1] <- "N.S"
c$p.adj.format.stars <- c$p.adj
c$p.adj.format.stars[c$p.adj >= 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.05] <- paste0("* (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.01] <- paste0("** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.001] <- paste0("*** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 2e-16] <- paste0("**** (p=", c$p.adj,")")
df_c <- as.data.frame(c)
plot_GSE166530 <-
df_combined %>%
filter(Project =="Nasal Swabs (GSE166530)") %>%
ggplot(
aes(y=A2GEditingIndex_Alu, x=Group))+
geom_boxplot(aes(fill=Group)) + geom_jitter( size=2, alpha = 0.2)+
facet_grid( ~ Project , drop = TRUE, scales = "free", space = "free",)+
themes_ggplot+ ylab("ALU Editing Index")+ xlab ("Group")+ scale_fill_discrete(name = "Group:")+
expand_limits(y = 0) + scale_fill_manual(values=c("blue","red"))+
theme(axis.title.x = element_blank())+ theme(legend.position = "none")+
geom_signif(data = df_c,
aes(xmin=group1, xmax=group2, annotations=p.adj.format.stars, y_position=y_pos),manual = TRUE)
## Scale for 'fill' is already present. Adding another scale for 'fill', which
## will replace the existing scale.
## Warning: Ignoring unknown aesthetics: xmin, xmax, annotations, y_position
plot_GSE166530

#Leukocytes (GSE157103) Nasal Swabs (GSE166530) Whole Blood (GSE167000) Whole Blood (GSE171110)
y_position = max(df_combined%>%
filter(Project =="Whole Blood (GSE167000)") %>% .$A2GEditingIndex_Alu)
c <- df_combined %>%
filter(Project =="Whole Blood (GSE167000)") %>%
compare_means(A2GEditingIndex_Alu ~Group, data = .)
c %<>% mutate(y_pos = c(y_position *1),
labels = ifelse(p < 0.05, sprintf("%2.1e",p),p))
# c <- c[c(1,3,2),] #reorder manually sorry
c$p.adj.format <- c$p.adj
c$p.adj.format[c$p.adj < 2e-16] <- "< 2e-16"
c$p.adj.format[as.numeric(c$p.adj) > 0.1] <- "N.S"
c$p.adj.format.stars <- c$p.adj
c$p.adj.format.stars[c$p.adj >= 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.05] <- paste0("* (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.01] <- paste0("** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.001] <- paste0("*** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 2e-16] <- paste0("**** (p=", c$p.adj,")")
df_c <- as.data.frame(c)
plot_GSE167000 <-
df_combined %>%
filter(Project =="Whole Blood (GSE167000)") %>%
ggplot(
aes(y=A2GEditingIndex_Alu, x=Group))+
geom_boxplot(aes(fill=Group)) + geom_jitter( size=2, alpha = 0.2)+
facet_grid( ~ Project , drop = TRUE, scales = "free", space = "free",)+
themes_ggplot+ ylab("ALU Editing Index")+ xlab ("Group")+ scale_fill_discrete(name = "Group:")+
expand_limits(y = 0) + scale_fill_manual(values=c("blue","red"))+
theme(axis.title.x = element_blank())+ theme(legend.position = "none")+
geom_signif(data = df_c,
aes(xmin=group1, xmax=group2, annotations=p.adj.format.stars, y_position=y_pos),manual = TRUE)
## Scale for 'fill' is already present. Adding another scale for 'fill', which
## will replace the existing scale.
## Warning: Ignoring unknown aesthetics: xmin, xmax, annotations, y_position
plot_GSE167000

#Leukocytes (GSE157103) Nasal Swabs (GSE166530) Whole Blood (GSE167000) Whole Blood (GSE171110)
y_position = max(df_combined%>%
filter(Project =="Whole Blood (GSE171110)") %>% .$A2GEditingIndex_Alu)
c <- df_combined %>%
filter(Project =="Whole Blood (GSE171110)") %>%
compare_means(A2GEditingIndex_Alu ~Group, data = .)
c %<>% mutate(y_pos = c(y_position *1),
labels = ifelse(p < 0.05, sprintf("%2.1e",p),p))
# c <- c[c(1,3,2),] #reorder manually sorry
c$p.adj.format <- c$p.adj
c$p.adj.format[c$p.adj < 2e-16] <- "< 2e-16"
c$p.adj.format[as.numeric(c$p.adj) > 0.1] <- "N.S"
c$p.adj.format.stars <- c$p.adj
c$p.adj.format.stars[c$p.adj >= 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.05] <- paste0("* (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.01] <- paste0("** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.001] <- paste0("*** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 2e-16] <- paste0("**** (p=", c$p.adj,")")
df_c <- as.data.frame(c)
plot_GSE171110 <-
df_combined %>%
filter(Project =="Whole Blood (GSE171110)") %>%
ggplot(
aes(y=A2GEditingIndex_Alu, x=Group))+
geom_boxplot(aes(fill=Group)) + geom_jitter( size=2, alpha = 0.2)+
facet_grid( ~ Project , drop = TRUE, scales = "free", space = "free",)+
themes_ggplot+ ylab("ALU Editing Index")+ xlab ("Group")+ scale_fill_discrete(name = "Group:")+
expand_limits(y = 0) + scale_fill_manual(values=c("blue","red"))+
theme(axis.title.x = element_blank())+ theme(legend.position = "none")+
geom_signif(data = df_c,
aes(xmin=group1, xmax=group2, annotations=p.adj.format.stars, y_position=y_pos),manual = TRUE)
## Scale for 'fill' is already present. Adding another scale for 'fill', which
## will replace the existing scale.
## Warning: Ignoring unknown aesthetics: xmin, xmax, annotations, y_position
plot_GSE171110

plot_grid(plot_GSE166530, plot_GSE167000, plot_GSE171110, plot_GSE157103,
labels = c('', '','',''), label_size = 12, ncol=4)

out_path <- paste0(OUT_DIR,'/',"AluEditing_all_combined.pdf")
ggsave(out_path, width = 14, height = 6)
Nasal Swab (GSE157103)
#Leukocytes (GSE157103) Nasal Swabs (GSE166530) Whole Blood (GSE167000) Whole Blood (GSE171110)
y_position = max(df_combined%>%
filter(Project =="Nasal Swabs (GSE166530)") %>% .$ADAR)
c <- df_combined %>%
filter(Project =="Nasal Swabs (GSE166530)") %>%
compare_means(ADAR ~Group, data = .)
c %<>% mutate(y_pos = c(y_position *1),
labels = ifelse(p < 0.05, sprintf("%2.1e",p),p))
# c <- c[c(1,3,2),] #reorder manually sorry
c$p.adj.format <- c$p.adj
c$p.adj.format[c$p.adj < 2e-16] <- "< 2e-16"
c$p.adj.format[as.numeric(c$p.adj) > 0.1] <- "N.S"
c$p.adj.format.stars <- c$p.adj
c$p.adj.format.stars[c$p.adj >= 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.05] <- paste0("* (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.01] <- paste0("** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.001] <- paste0("*** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 2e-16] <- paste0("**** (p=", c$p.adj,")")
df_c <- as.data.frame(c)
plot_GSE166530.ADAR <-
df_combined %>%
filter(Project =="Nasal Swabs (GSE166530)") %>%
ggplot(
aes(y=ADAR, x=Group))+
geom_boxplot(aes(fill=Group)) + geom_jitter( size=2, alpha = 0.2)+
# facet_grid( ~ Project , drop = TRUE, scales = "free", space = "free",)+
themes_ggplot+ ylab("Normalized Expression (TPM)")+ xlab ("Group")+ scale_fill_discrete(name = "Group:")+
expand_limits(y = 0) + scale_fill_manual(values=c("blue","red"))+
theme(axis.title.x = element_blank())+ theme(legend.position = "none")+
geom_signif(data = df_c,
aes(xmin=group1, xmax=group2, annotations=p.adj.format.stars, y_position=y_pos),manual = TRUE)
## Scale for 'fill' is already present. Adding another scale for 'fill', which
## will replace the existing scale.
## Warning: Ignoring unknown aesthetics: xmin, xmax, annotations, y_position
plot_GSE166530.ADAR

#Leukocytes (GSE157103) Nasal Swabs (GSE166530) Whole Blood (GSE167000) Whole Blood (GSE171110)
y_position = max(df_combined%>%
filter(Project =="Nasal Swabs (GSE166530)") %>% .$ADARB1)
c <- df_combined %>%
filter(Project =="Nasal Swabs (GSE166530)") %>%
compare_means(ADARB1 ~Group, data = .)
c %<>% mutate(y_pos = c(y_position *1),
labels = ifelse(p < 0.05, sprintf("%2.1e",p),p))
# c <- c[c(1,3,2),] #reorder manually sorry
c$p.adj.format <- c$p.adj
c$p.adj.format[c$p.adj < 2e-16] <- "< 2e-16"
c$p.adj.format[as.numeric(c$p.adj) > 0.1] <- "N.S"
c$p.adj.format.stars <- c$p.adj
c$p.adj.format.stars[c$p.adj >= 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.05] <- paste0("* (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.01] <- paste0("** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.001] <- paste0("*** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 2e-16] <- paste0("**** (p=", c$p.adj,")")
df_c <- as.data.frame(c)
plot_GSE166530.ADARB1 <-
df_combined %>%
filter(Project =="Nasal Swabs (GSE166530)") %>%
ggplot(
aes(y=ADARB1, x=Group))+
geom_boxplot(aes(fill=Group)) + geom_jitter( size=2, alpha = 0.2)+
# facet_grid( ~ Project , drop = TRUE, scales = "free", space = "free",)+
themes_ggplot+ ylab("Normalized Expression (TPM)")+ xlab ("Group")+ scale_fill_discrete(name = "Group:")+
expand_limits(y = 0) + scale_fill_manual(values=c("blue","red"))+
theme(axis.title.x = element_blank())+ theme(legend.position = "none")+
geom_signif(data = df_c,
aes(xmin=group1, xmax=group2, annotations=p.adj.format.stars, y_position=y_pos),manual = TRUE)
## Scale for 'fill' is already present. Adding another scale for 'fill', which
## will replace the existing scale.
## Warning: Ignoring unknown aesthetics: xmin, xmax, annotations, y_position
plot_GSE166530.ADARB1

#Leukocytes (GSE157103) Nasal Swabs (GSE166530) Whole Blood (GSE167000) Whole Blood (GSE171110)
y_position = max(df_combined%>%
filter(Project =="Nasal Swabs (GSE166530)") %>% .$ADARB2)
c <- df_combined %>%
filter(Project =="Nasal Swabs (GSE166530)") %>%
compare_means(ADARB2 ~Group, data = .)
c %<>% mutate(y_pos = c(y_position *1),
labels = ifelse(p < 0.05, sprintf("%2.1e",p),p))
# c <- c[c(1,3,2),] #reorder manually sorry
c$p.adj.format <- c$p.adj
c$p.adj.format[c$p.adj < 2e-16] <- "< 2e-16"
c$p.adj.format[as.numeric(c$p.adj) > 0.1] <- "N.S"
c$p.adj.format.stars <- c$p.adj
c$p.adj.format.stars[c$p.adj >= 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.05] <- paste0("* (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.01] <- paste0("** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.001] <- paste0("*** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 2e-16] <- paste0("**** (p=", c$p.adj,")")
df_c <- as.data.frame(c)
plot_GSE166530.ADARB2 <-
df_combined %>%
filter(Project =="Nasal Swabs (GSE166530)") %>%
ggplot(
aes(y=ADARB2, x=Group))+
geom_boxplot(aes(fill=Group)) + geom_jitter( size=2, alpha = 0.2)+
# facet_grid( ~ Project , drop = TRUE, scales = "free", space = "free",)+
themes_ggplot+ ylab("Normalized Expression (TPM)")+ xlab ("Group")+ scale_fill_discrete(name = "Group:")+
expand_limits(y = 0) + scale_fill_manual(values=c("blue","red"))+
theme(axis.title.x = element_blank())+ theme(legend.position = "none")+
geom_signif(data = df_c,
aes(xmin=group1, xmax=group2, annotations=p.adj.format.stars, y_position=y_pos),manual = TRUE)
## Scale for 'fill' is already present. Adding another scale for 'fill', which
## will replace the existing scale.
## Warning: Ignoring unknown aesthetics: xmin, xmax, annotations, y_position
plot_GSE166530.ADARB2

plot_grid(plot_GSE166530.ADAR+facet_grid(~"ADAR"),
plot_GSE166530.ADARB1+facet_grid(~"ADAR2"),
plot_GSE166530.ADARB2+facet_grid(~"ADAR3"),
labels = c('', '',''), label_size = 12, ncol=4)

out_path <- paste0(OUT_DIR,'/',"SALMON_Nasal Swabs_GSE166530.pdf")
ggsave(out_path, width = 14, height = 6)
Whole Blood (GSE167000)
#Leukocytes (GSE157103) Nasal Swabs (GSE166530) Whole Blood (GSE167000) Whole Blood (GSE171110)
y_position = max(df_combined%>%
filter(Project =="Whole Blood (GSE167000)") %>% .$ADAR, na.rm=T)
c <- df_combined %>%
filter(Project =="Whole Blood (GSE167000)") %>%
compare_means(ADAR ~Group, data = .)
c %<>% mutate(y_pos = c(y_position *1),
labels = ifelse(p < 0.05, sprintf("%2.1e",p),p))
# c <- c[c(1,3,2),] #reorder manually sorry
c$p.adj.format <- c$p.adj
c$p.adj.format[c$p.adj < 2e-16] <- "< 2e-16"
c$p.adj.format[as.numeric(c$p.adj) > 0.1] <- "N.S"
c$p.adj.format.stars <- c$p.adj
c$p.adj.format.stars[c$p.adj >= 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.05] <- paste0("* (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.01] <- paste0("** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.001] <- paste0("*** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 2e-16] <- paste0("**** (p=", c$p.adj,")")
df_c <- as.data.frame(c)
plot_GSE167000.ADAR <-
df_combined %>%
filter(Project =="Whole Blood (GSE167000)") %>%
ggplot(
aes(y=ADAR, x=Group))+
geom_boxplot(aes(fill=Group)) + geom_jitter( size=2, alpha = 0.2)+
# facet_grid( ~ Project , drop = TRUE, scales = "free", space = "free",)+
themes_ggplot+ ylab("Normalized Expression (TPM)")+ xlab ("Group")+ scale_fill_discrete(name = "Group:")+
expand_limits(y = 0) + scale_fill_manual(values=c("blue","red"))+
theme(axis.title.x = element_blank())+ theme(legend.position = "none")+
geom_signif(data = df_c,
aes(xmin=group1, xmax=group2, annotations=p.adj.format.stars, y_position=y_pos),manual = TRUE)
## Scale for 'fill' is already present. Adding another scale for 'fill', which
## will replace the existing scale.
## Warning: Ignoring unknown aesthetics: xmin, xmax, annotations, y_position
plot_GSE167000.ADAR
## Warning: Removed 51 rows containing non-finite values (stat_boxplot).
## Warning: Removed 51 rows containing missing values (geom_point).

#Leukocytes (GSE157103) Nasal Swabs (GSE166530) Whole Blood (GSE167000) Whole Blood (GSE171110)
y_position = max(df_combined%>%
filter(Project =="Whole Blood (GSE167000)") %>% .$ADARB1, na.rm=T)
c <- df_combined %>%
filter(Project =="Whole Blood (GSE167000)") %>%
compare_means(ADARB1 ~Group, data = .)
c %<>% mutate(y_pos = c(y_position *1),
labels = ifelse(p < 0.05, sprintf("%2.1e",p),p))
# c <- c[c(1,3,2),] #reorder manually sorry
c$p.adj.format <- c$p.adj
c$p.adj.format[c$p.adj < 2e-16] <- "< 2e-16"
c$p.adj.format[as.numeric(c$p.adj) > 0.1] <- "N.S"
c$p.adj.format.stars <- c$p.adj
c$p.adj.format.stars[c$p.adj >= 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.05] <- paste0("* (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.01] <- paste0("** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.001] <- paste0("*** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 2e-16] <- paste0("**** (p=", c$p.adj,")")
df_c <- as.data.frame(c)
plot_GSE167000.ADARB1 <-
df_combined %>%
filter(Project =="Whole Blood (GSE167000)") %>%
ggplot(
aes(y=ADARB1, x=Group))+
geom_boxplot(aes(fill=Group)) + geom_jitter( size=2, alpha = 0.2)+
# facet_grid( ~ Project , drop = TRUE, scales = "free", space = "free",)+
themes_ggplot+ ylab("Normalized Expression (TPM)")+ xlab ("Group")+ scale_fill_discrete(name = "Group:")+
expand_limits(y = 0) + scale_fill_manual(values=c("blue","red"))+
theme(axis.title.x = element_blank())+ theme(legend.position = "none")+
geom_signif(data = df_c,
aes(xmin=group1, xmax=group2, annotations=p.adj.format.stars, y_position=y_pos),manual = TRUE)
## Scale for 'fill' is already present. Adding another scale for 'fill', which
## will replace the existing scale.
## Warning: Ignoring unknown aesthetics: xmin, xmax, annotations, y_position
plot_GSE167000.ADARB1
## Warning: Removed 51 rows containing non-finite values (stat_boxplot).
## Warning: Removed 51 rows containing missing values (geom_point).

#Leukocytes (GSE157103) Nasal Swabs (GSE166530) Whole Blood (GSE167000) Whole Blood (GSE171110)
y_position = max(df_combined%>%
filter(Project =="Whole Blood (GSE167000)") %>% .$ADARB2,na.rm=T)
c <- df_combined %>%
filter(Project =="Whole Blood (GSE167000)") %>%
compare_means(ADARB2 ~Group, data = .)
c %<>% mutate(y_pos = c(y_position *1),
labels = ifelse(p < 0.05, sprintf("%2.1e",p),p))
# c <- c[c(1,3,2),] #reorder manually sorry
c$p.adj.format <- c$p.adj
c$p.adj.format[c$p.adj < 2e-16] <- "< 2e-16"
c$p.adj.format[as.numeric(c$p.adj) > 0.1] <- "N.S"
c$p.adj.format.stars <- c$p.adj
c$p.adj.format.stars[c$p.adj >= 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.05] <- paste0("* (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.01] <- paste0("** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.001] <- paste0("*** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 2e-16] <- paste0("**** (p=", c$p.adj,")")
df_c <- as.data.frame(c)
plot_GSE167000.ADARB2 <-
df_combined %>%
filter(Project =="Whole Blood (GSE167000)") %>%
ggplot(
aes(y=ADARB2, x=Group))+
geom_boxplot(aes(fill=Group)) + geom_jitter( size=2, alpha = 0.2)+
# facet_grid( ~ Project , drop = TRUE, scales = "free", space = "free",)+
themes_ggplot+ ylab("Normalized Expression (TPM)")+ xlab ("Group")+ scale_fill_discrete(name = "Group:")+
expand_limits(y = 0) + scale_fill_manual(values=c("blue","red"))+
theme(axis.title.x = element_blank())+ theme(legend.position = "none")+
geom_signif(data = df_c,
aes(xmin=group1, xmax=group2, annotations=p.adj.format.stars, y_position=y_pos),manual = TRUE)
## Scale for 'fill' is already present. Adding another scale for 'fill', which
## will replace the existing scale.
## Warning: Ignoring unknown aesthetics: xmin, xmax, annotations, y_position
plot_GSE167000.ADARB2
## Warning: Removed 51 rows containing non-finite values (stat_boxplot).
## Warning: Removed 51 rows containing missing values (geom_point).

plot_grid(plot_GSE167000.ADAR+facet_grid(~"ADAR"),
plot_GSE167000.ADARB1+facet_grid(~"ADAR2"),
plot_GSE167000.ADARB2+facet_grid(~"ADAR3"),
labels = c('', '',''), label_size = 12, ncol=4)
## Warning: Removed 51 rows containing non-finite values (stat_boxplot).
## Warning: Removed 51 rows containing missing values (geom_point).
## Warning: Removed 51 rows containing non-finite values (stat_boxplot).
## Warning: Removed 51 rows containing missing values (geom_point).
## Warning: Removed 51 rows containing non-finite values (stat_boxplot).
## Warning: Removed 51 rows containing missing values (geom_point).

out_path <- paste0(OUT_DIR,'/',"SALMON_WholeBlood_GSE167000.pdf")
ggsave(out_path, width = 14, height = 6)
#Leukocytes (GSE157103) Nasal Swabs (GSE166530) Whole Blood (GSE167000) Whole Blood (GSE171110)
y_position = max(df_combined%>%
filter(Project =="Nasal Swabs (GSE166530)") %>% .$A2GEditingIndex_Alu)
c <- df_combined %>%
filter(Project =="Nasal Swabs (GSE166530)") %>%
compare_means(A2GEditingIndex_Alu ~Group, data = .)
c %<>% mutate(y_pos = c(y_position *1),
labels = ifelse(p < 0.05, sprintf("%2.1e",p),p))
# c <- c[c(1,3,2),] #reorder manually sorry
c$p.adj.format <- c$p.adj
c$p.adj.format[c$p.adj < 2e-16] <- "< 2e-16"
c$p.adj.format[as.numeric(c$p.adj) > 0.1] <- "N.S"
c$p.adj.format.stars <- c$p.adj
c$p.adj.format.stars[c$p.adj >= 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.05] <- paste0("* (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.01] <- paste0("** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.001] <- paste0("*** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 2e-16] <- paste0("**** (p=", c$p.adj,")")
df_c <- as.data.frame(c)
plot_GSE166530 <-
df_combined %>%
filter(Project =="Nasal Swabs (GSE166530)") %>%
ggplot(
aes(y=A2GEditingIndex_Alu, x=Group))+
geom_boxplot(aes(fill=Group)) + geom_jitter( size=2, alpha = 0.2)+
facet_grid( ~ Project , drop = TRUE, scales = "free", space = "free",)+
themes_ggplot+ ylab("ALU Editing Index")+ xlab ("Group")+ scale_fill_discrete(name = "Group:")+
expand_limits(y = 0) + scale_fill_manual(values=c("blue","red"))+
theme(axis.title.x = element_blank())+ theme(legend.position = "none")+
geom_signif(data = df_c,
aes(xmin=group1, xmax=group2, annotations=p.adj.format.stars, y_position=y_pos),manual = TRUE)
## Scale for 'fill' is already present. Adding another scale for 'fill', which
## will replace the existing scale.
## Warning: Ignoring unknown aesthetics: xmin, xmax, annotations, y_position
plot_GSE166530

#Leukocytes (GSE157103) Nasal Swabs (GSE166530) Whole Blood (GSE167000) Whole Blood (GSE171110)
y_position = max(df_combined%>%
filter(Project =="Whole Blood (GSE167000)") %>% .$A2GEditingIndex_Alu)
c <- df_combined %>%
filter(Project =="Whole Blood (GSE167000)") %>%
compare_means(A2GEditingIndex_Alu ~Group, data = .)
c %<>% mutate(y_pos = c(y_position *1),
labels = ifelse(p < 0.05, sprintf("%2.1e",p),p))
# c <- c[c(1,3,2),] #reorder manually sorry
c$p.adj.format <- c$p.adj
c$p.adj.format[c$p.adj < 2e-16] <- "< 2e-16"
c$p.adj.format[as.numeric(c$p.adj) > 0.1] <- "N.S"
c$p.adj.format.stars <- c$p.adj
c$p.adj.format.stars[c$p.adj >= 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.05] <- paste0("* (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.01] <- paste0("** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.001] <- paste0("*** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 2e-16] <- paste0("**** (p=", c$p.adj,")")
df_c <- as.data.frame(c)
plot_GSE167000 <-
df_combined %>%
filter(Project =="Whole Blood (GSE167000)") %>%
ggplot(
aes(y=A2GEditingIndex_Alu, x=Group))+
geom_boxplot(aes(fill=Group)) + geom_jitter( size=2, alpha = 0.2)+
facet_grid( ~ Project , drop = TRUE, scales = "free", space = "free",)+
themes_ggplot+ ylab("ALU Editing Index")+ xlab ("Group")+ scale_fill_discrete(name = "Group:")+
expand_limits(y = 0) + scale_fill_manual(values=c("blue","red"))+
theme(axis.title.x = element_blank())+ theme(legend.position = "none")+
geom_signif(data = df_c,
aes(xmin=group1, xmax=group2, annotations=p.adj.format.stars, y_position=y_pos),manual = TRUE)
## Scale for 'fill' is already present. Adding another scale for 'fill', which
## will replace the existing scale.
## Warning: Ignoring unknown aesthetics: xmin, xmax, annotations, y_position
plot_GSE167000

#Leukocytes (GSE157103) Nasal Swabs (GSE166530) Whole Blood (GSE167000) Whole Blood (GSE171110)
y_position = max(df_combined%>%
filter(Project =="Whole Blood (GSE171110)") %>% .$A2GEditingIndex_Alu)
c <- df_combined %>%
filter(Project =="Whole Blood (GSE171110)") %>%
compare_means(A2GEditingIndex_Alu ~Group, data = .)
c %<>% mutate(y_pos = c(y_position *1),
labels = ifelse(p < 0.05, sprintf("%2.1e",p),p))
# c <- c[c(1,3,2),] #reorder manually sorry
c$p.adj.format <- c$p.adj
c$p.adj.format[c$p.adj < 2e-16] <- "< 2e-16"
c$p.adj.format[as.numeric(c$p.adj) > 0.1] <- "N.S"
c$p.adj.format.stars <- c$p.adj
c$p.adj.format.stars[c$p.adj >= 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.05] <- paste0("* (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.01] <- paste0("** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.001] <- paste0("*** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 2e-16] <- paste0("**** (p=", c$p.adj,")")
df_c <- as.data.frame(c)
plot_GSE171110 <-
df_combined %>%
filter(Project =="Whole Blood (GSE171110)") %>%
ggplot(
aes(y=A2GEditingIndex_Alu, x=Group))+
geom_boxplot(aes(fill=Group)) + geom_jitter( size=2, alpha = 0.2)+
facet_grid( ~ Project , drop = TRUE, scales = "free", space = "free",)+
themes_ggplot+ ylab("ALU Editing Index")+ xlab ("Group")+ scale_fill_discrete(name = "Group:")+
expand_limits(y = 0) + scale_fill_manual(values=c("blue","red"))+
theme(axis.title.x = element_blank())+ theme(legend.position = "none")+
geom_signif(data = df_c,
aes(xmin=group1, xmax=group2, annotations=p.adj.format.stars, y_position=y_pos),manual = TRUE)
## Scale for 'fill' is already present. Adding another scale for 'fill', which
## will replace the existing scale.
## Warning: Ignoring unknown aesthetics: xmin, xmax, annotations, y_position
plot_GSE171110

plot_grid(plot_GSE166530, plot_GSE167000, plot_GSE171110, plot_GSE157103,
labels = c('', '','',''), label_size = 12, ncol=4)

out_path <- paste0(OUT_DIR,'/',"AluEditing_all_combined.pdf")
ggsave(out_path, width = 14, height = 6)
Nasal Swabs (GSE166530)
Whole Blood (GSE167000)
#Leukocytes (GSE157103) Nasal Swabs (GSE166530) Whole Blood (GSE167000) Whole Blood (GSE171110)
y_position = max(df_combined%>%
filter(Project =="Whole Blood (GSE171110)") %>% .$ADAR, na.rm=T)
c <- df_combined %>%
filter(Project =="Whole Blood (GSE171110)") %>%
compare_means(ADAR ~Group, data = .)
c %<>% mutate(y_pos = c(y_position *1),
labels = ifelse(p < 0.05, sprintf("%2.1e",p),p))
# c <- c[c(1,3,2),] #reorder manually sorry
c$p.adj.format <- c$p.adj
c$p.adj.format[c$p.adj < 2e-16] <- "< 2e-16"
c$p.adj.format[as.numeric(c$p.adj) > 0.1] <- "N.S"
c$p.adj.format.stars <- c$p.adj
c$p.adj.format.stars[c$p.adj >= 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.05] <- paste0("* (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.01] <- paste0("** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.001] <- paste0("*** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 2e-16] <- paste0("**** (p=", c$p.adj,")")
df_c <- as.data.frame(c)
plot_GSE171110.ADAR <-
df_combined %>%
filter(Project =="Whole Blood (GSE171110)") %>%
ggplot(
aes(y=ADAR, x=Group))+
geom_boxplot(aes(fill=Group)) + geom_jitter( size=2, alpha = 0.2)+
# facet_grid( ~ Project , drop = TRUE, scales = "free", space = "free",)+
themes_ggplot+ ylab("Normalized Expression (TPM)")+ xlab ("Group")+ scale_fill_discrete(name = "Group:")+
expand_limits(y = 0) + scale_fill_manual(values=c("blue","red"))+
theme(axis.title.x = element_blank())+ theme(legend.position = "none")+
geom_signif(data = df_c,
aes(xmin=group1, xmax=group2, annotations=p.adj.format.stars, y_position=y_pos),manual = TRUE)
## Scale for 'fill' is already present. Adding another scale for 'fill', which
## will replace the existing scale.
## Warning: Ignoring unknown aesthetics: xmin, xmax, annotations, y_position
plot_GSE171110.ADAR

#Leukocytes (GSE157103) Nasal Swabs (GSE166530) Whole Blood (GSE167000) Whole Blood (GSE171110)
y_position = max(df_combined%>%
filter(Project =="Whole Blood (GSE171110)") %>% .$ADARB1, na.rm=T)
c <- df_combined %>%
filter(Project =="Whole Blood (GSE171110)") %>%
compare_means(ADARB1 ~Group, data = .)
c %<>% mutate(y_pos = c(y_position *1),
labels = ifelse(p < 0.05, sprintf("%2.1e",p),p))
# c <- c[c(1,3,2),] #reorder manually sorry
c$p.adj.format <- c$p.adj
c$p.adj.format[c$p.adj < 2e-16] <- "< 2e-16"
c$p.adj.format[as.numeric(c$p.adj) > 0.1] <- "N.S"
c$p.adj.format.stars <- c$p.adj
c$p.adj.format.stars[c$p.adj >= 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.05] <- paste0("* (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.01] <- paste0("** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.001] <- paste0("*** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 2e-16] <- paste0("**** (p=", c$p.adj,")")
df_c <- as.data.frame(c)
plot_GSE171110.ADARB1 <-
df_combined %>%
filter(Project =="Whole Blood (GSE171110)") %>%
ggplot(
aes(y=ADARB1, x=Group))+
geom_boxplot(aes(fill=Group)) + geom_jitter( size=2, alpha = 0.2)+
# facet_grid( ~ Project , drop = TRUE, scales = "free", space = "free",)+
themes_ggplot+ ylab("Normalized Expression (TPM)")+ xlab ("Group")+ scale_fill_discrete(name = "Group:")+
expand_limits(y = 0) + scale_fill_manual(values=c("blue","red"))+
theme(axis.title.x = element_blank())+ theme(legend.position = "none")+
geom_signif(data = df_c,
aes(xmin=group1, xmax=group2, annotations=p.adj.format.stars, y_position=y_pos),manual = TRUE)
## Scale for 'fill' is already present. Adding another scale for 'fill', which
## will replace the existing scale.
## Warning: Ignoring unknown aesthetics: xmin, xmax, annotations, y_position
plot_GSE171110.ADARB1

#Leukocytes (GSE157103) Nasal Swabs (GSE166530) Whole Blood (GSE167000) Whole Blood (GSE171110)
y_position = max(df_combined%>%
filter(Project =="Whole Blood (GSE171110)") %>% .$ADARB2,na.rm=T)
c <- df_combined %>%
filter(Project =="Whole Blood (GSE171110)") %>%
compare_means(ADARB2 ~Group, data = .)
c %<>% mutate(y_pos = c(y_position *1),
labels = ifelse(p < 0.05, sprintf("%2.1e",p),p))
# c <- c[c(1,3,2),] #reorder manually sorry
c$p.adj.format <- c$p.adj
c$p.adj.format[c$p.adj < 2e-16] <- "< 2e-16"
c$p.adj.format[as.numeric(c$p.adj) > 0.1] <- "N.S"
c$p.adj.format.stars <- c$p.adj
c$p.adj.format.stars[c$p.adj >= 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.05] <- paste0("* (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.01] <- paste0("** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.001] <- paste0("*** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 2e-16] <- paste0("**** (p=", c$p.adj,")")
df_c <- as.data.frame(c)
plot_GSE171110.ADARB2 <-
df_combined %>%
filter(Project =="Whole Blood (GSE171110)") %>%
ggplot(
aes(y=ADARB2, x=Group))+
geom_boxplot(aes(fill=Group)) + geom_jitter( size=2, alpha = 0.2)+
# facet_grid( ~ Project , drop = TRUE, scales = "free", space = "free",)+
themes_ggplot+ ylab("Normalized Expression (TPM)")+ xlab ("Group")+ scale_fill_discrete(name = "Group:")+
expand_limits(y = 0) + scale_fill_manual(values=c("blue","red"))+
theme(axis.title.x = element_blank())+ theme(legend.position = "none")+
geom_signif(data = df_c,
aes(xmin=group1, xmax=group2, annotations=p.adj.format.stars, y_position=y_pos),manual = TRUE)
## Scale for 'fill' is already present. Adding another scale for 'fill', which
## will replace the existing scale.
## Warning: Ignoring unknown aesthetics: xmin, xmax, annotations, y_position
plot_GSE171110.ADARB2

#Leukocytes (GSE157103) Nasal Swabs (GSE166530) Whole Blood (GSE167000) Whole Blood (GSE171110)
plot_grid(plot_GSE171110.ADAR+facet_grid(~"ADAR"),
plot_GSE171110.ADARB1+facet_grid(~"ADAR2"),
plot_GSE171110.ADARB2+facet_grid(~"ADAR3"),
labels = c('', '',''), label_size = 12, ncol=4)

out_path <- paste0(OUT_DIR,'/',"SALMON_WholeBlood_GSE171110.pdf")
ggsave(out_path, width = 14, height = 6)
All datasets
#Leukocytes (GSE157103) Nasal Swabs (GSE166530) Whole Blood (GSE167000) Whole Blood (GSE171110)
plot_grid(plot_GSE166530.ADAR+facet_grid(~"Nasal Swabs (GSE166530)"),
plot_GSE167000.ADAR+facet_grid(~"Whole Blood (GSE167000)"),
plot_GSE171110.ADAR+facet_grid(~"Whole Blood (GSE171110)"),
plot_GSE157103.ADAR+facet_grid(~"Leukocytes (GSE157103)"),
labels = c('', '','',''), label_size = 12, ncol=4)
## Warning: Removed 51 rows containing non-finite values (stat_boxplot).
## Warning: Removed 51 rows containing missing values (geom_point).

out_path <- paste0(OUT_DIR,'/',"SALMON_All_adar1.pdf")
ggsave(out_path, width = 16, height = 6)
ISG
#Leukocytes (GSE157103) Nasal Swabs (GSE166530) Whole Blood (GSE167000) Whole Blood (GSE171110)
y_position = max(df_combined%>%
filter(Project =="Leukocytes (GSE157103)") %>% .$ISG38_score)
c <- df_combined %>%
filter(Project =="Leukocytes (GSE157103)") %>%
compare_means(ISG38_score ~Group, data = .)
c %<>% mutate(y_pos = c(y_position *1),
labels = ifelse(p < 0.05, sprintf("%2.1e",p),p))
# c <- c[c(1,3,2),] #reorder manually sorry
c$p.adj.format <- c$p.adj
c$p.adj.format[c$p.adj < 2e-16] <- "< 2e-16"
c$p.adj.format[as.numeric(c$p.adj) > 0.1] <- "N.S"
c$p.adj.format.stars <- c$p.adj
c$p.adj.format.stars[c$p.adj >= 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.05] <- paste0("* (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.01] <- paste0("** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.001] <- paste0("*** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 2e-16] <- paste0("**** (p=", c$p.adj,")")
df_c <- as.data.frame(c)
plot_GSE157103 <-
df_combined %>%
filter(Project =="Leukocytes (GSE157103)") %>%
ggplot(
aes(y=ISG38_score, x=Group))+
geom_boxplot(aes(fill=Group)) + geom_jitter( size=2, alpha = 0.2)+
facet_grid( ~ Project , drop = TRUE, scales = "free", space = "free",)+
themes_ggplot+ ylab("Interferon signalling genes")+ xlab ("Group")+ scale_fill_discrete(name = "Group:")+
expand_limits(y = 0) + scale_fill_manual(values=c("blue","red"))+
theme(axis.title.x = element_blank())+ theme(legend.position = "none")+
geom_signif(data = df_c,
aes(xmin=group1, xmax=group2, annotations=p.adj.format.stars, y_position=y_pos),manual = TRUE)
## Scale for 'fill' is already present. Adding another scale for 'fill', which
## will replace the existing scale.
## Warning: Ignoring unknown aesthetics: xmin, xmax, annotations, y_position
plot_GSE157103

#Leukocytes (GSE157103) Nasal Swabs (GSE166530) Whole Blood (GSE167000) Whole Blood (GSE171110)
y_position = max(df_combined%>%
filter(Project =="Nasal Swabs (GSE166530)") %>% .$ISG38_score)
c <- df_combined %>%
filter(Project =="Nasal Swabs (GSE166530)") %>%
compare_means(ISG38_score ~Group, data = .)
c %<>% mutate(y_pos = c(y_position *1),
labels = ifelse(p < 0.05, sprintf("%2.1e",p),p))
# c <- c[c(1,3,2),] #reorder manually sorry
c$p.adj.format <- c$p.adj
c$p.adj.format[c$p.adj < 2e-16] <- "< 2e-16"
c$p.adj.format[as.numeric(c$p.adj) > 0.1] <- "N.S"
c$p.adj.format.stars <- c$p.adj
c$p.adj.format.stars[c$p.adj >= 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.05] <- paste0("* (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.01] <- paste0("** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.001] <- paste0("*** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 2e-16] <- paste0("**** (p=", c$p.adj,")")
df_c <- as.data.frame(c)
plot_GSE166530 <-
df_combined %>%
filter(Project =="Nasal Swabs (GSE166530)") %>%
ggplot(
aes(y=ISG38_score, x=Group))+
geom_boxplot(aes(fill=Group)) + geom_jitter( size=2, alpha = 0.2)+
facet_grid( ~ Project , drop = TRUE, scales = "free", space = "free",)+
themes_ggplot+ ylab("Interferon signalling genes")+ xlab ("Group")+ scale_fill_discrete(name = "Group:")+
expand_limits(y = 0) + scale_fill_manual(values=c("blue","red"))+
theme(axis.title.x = element_blank())+ theme(legend.position = "none")+
geom_signif(data = df_c,
aes(xmin=group1, xmax=group2, annotations=p.adj.format.stars, y_position=y_pos),manual = TRUE)
## Scale for 'fill' is already present. Adding another scale for 'fill', which
## will replace the existing scale.
## Warning: Ignoring unknown aesthetics: xmin, xmax, annotations, y_position
plot_GSE166530

#Leukocytes (GSE157103) Nasal Swabs (GSE166530) Whole Blood (GSE167000) Whole Blood (GSE171110)
y_position = max(df_combined%>%
filter(Project =="Whole Blood (GSE167000)") %>% .$ISG38_score)
c <- df_combined %>%
filter(Project =="Whole Blood (GSE167000)") %>%
compare_means(ISG38_score ~Group, data = .)
c %<>% mutate(y_pos = c(y_position *1),
labels = ifelse(p < 0.05, sprintf("%2.1e",p),p))
# c <- c[c(1,3,2),] #reorder manually sorry
c$p.adj.format <- c$p.adj
c$p.adj.format[c$p.adj < 2e-16] <- "< 2e-16"
c$p.adj.format[as.numeric(c$p.adj) > 0.1] <- "N.S"
c$p.adj.format.stars <- c$p.adj
c$p.adj.format.stars[c$p.adj >= 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.05] <- paste0("* (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.01] <- paste0("** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.001] <- paste0("*** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 2e-16] <- paste0("**** (p=", c$p.adj,")")
df_c <- as.data.frame(c)
plot_GSE167000 <-
df_combined %>%
filter(Project =="Whole Blood (GSE167000)") %>%
ggplot(
aes(y=ISG38_score, x=Group))+
geom_boxplot(aes(fill=Group)) + geom_jitter( size=2, alpha = 0.2)+
facet_grid( ~ Project , drop = TRUE, scales = "free", space = "free",)+
themes_ggplot+ ylab("Interferon signalling genes")+ xlab ("Group")+ scale_fill_discrete(name = "Group:")+
expand_limits(y = 0) + scale_fill_manual(values=c("blue","red"))+
theme(axis.title.x = element_blank())+ theme(legend.position = "none")+
geom_signif(data = df_c,
aes(xmin=group1, xmax=group2, annotations=p.adj.format.stars, y_position=y_pos),manual = TRUE)
## Scale for 'fill' is already present. Adding another scale for 'fill', which
## will replace the existing scale.
## Warning: Ignoring unknown aesthetics: xmin, xmax, annotations, y_position
plot_GSE167000

#Leukocytes (GSE157103) Nasal Swabs (GSE166530) Whole Blood (GSE167000) Whole Blood (GSE171110)
y_position = max(df_combined%>%
filter(Project =="Whole Blood (GSE171110)") %>% .$ISG38_score)
c <- df_combined %>%
filter(Project =="Whole Blood (GSE171110)") %>%
compare_means(ISG38_score ~Group, data = .)
c %<>% mutate(y_pos = c(y_position *1),
labels = ifelse(p < 0.05, sprintf("%2.1e",p),p))
# c <- c[c(1,3,2),] #reorder manually sorry
c$p.adj.format <- c$p.adj
c$p.adj.format[c$p.adj < 2e-16] <- "< 2e-16"
c$p.adj.format[as.numeric(c$p.adj) > 0.1] <- "N.S"
c$p.adj.format.stars <- c$p.adj
c$p.adj.format.stars[c$p.adj >= 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.1] <- "ns"
c$p.adj.format.stars[c$p.adj < 0.05] <- paste0("* (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.01] <- paste0("** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 0.001] <- paste0("*** (p=", c$p.adj,")")
c$p.adj.format.stars[c$p.adj < 2e-16] <- paste0("**** (p=", c$p.adj,")")
df_c <- as.data.frame(c)
plot_GSE171110 <-
df_combined %>%
filter(Project =="Whole Blood (GSE171110)") %>%
ggplot(
aes(y=ISG38_score, x=Group))+
geom_boxplot(aes(fill=Group)) + geom_jitter( size=2, alpha = 0.2)+
facet_grid( ~ Project , drop = TRUE, scales = "free", space = "free",)+
themes_ggplot+ ylab("Interferon signalling genes")+ xlab ("Group")+ scale_fill_discrete(name = "Group:")+
expand_limits(y = 0) + scale_fill_manual(values=c("blue","red"))+
theme(axis.title.x = element_blank())+ theme(legend.position = "none")+
geom_signif(data = df_c,
aes(xmin=group1, xmax=group2, annotations=p.adj.format.stars, y_position=y_pos),manual = TRUE)
## Scale for 'fill' is already present. Adding another scale for 'fill', which
## will replace the existing scale.
## Warning: Ignoring unknown aesthetics: xmin, xmax, annotations, y_position
plot_GSE171110

plot_grid(plot_GSE166530, plot_GSE167000, plot_GSE171110, plot_GSE157103,
labels = c('', '','',''), label_size = 12, ncol=4)

out_path <- paste0(OUT_DIR,'/',"ISG_all_combined.pdf")
ggsave(out_path, width = 14, height = 6)
correlation
corr_alu_ADAR <- df_combined %>%
ggplot(aes(y=A2GEditingIndex_Alu, x=ADAR))+ facet_wrap(~Project)+
geom_point(aes(color=Group),size=3, alpha = 0.4) + themes_ggplot+ geom_smooth(method='lm', se=F, colour ="black")+
stat_cor(method = "pearson", label.x.npc = "left", label.y.npc = "top") + scale_color_manual(values=c("blue","red"), name = "Group:") +
ylab("ALU Editing Index")+ xlab ("ADAR1 Normalized Expression (TPM)")
corr_alu_ADAR
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 51 rows containing non-finite values (stat_smooth).
## Warning: Removed 51 rows containing non-finite values (stat_cor).
## Warning: Removed 51 rows containing missing values (geom_point).

out_path <- paste0(OUT_DIR,'/',"corr_Alu_ADAR.pdf")
ggsave(out_path, corr_alu_ADAR, width = 10, height = 6)
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 51 rows containing non-finite values (stat_smooth).
## Warning: Removed 51 rows containing non-finite values (stat_cor).
## Warning: Removed 51 rows containing missing values (geom_point).
corr_ISG_ADAR <- df_combined %>%
ggplot(aes(y=ISG38_score, x=ADAR))+
geom_point(aes(color=Group),size=3, alpha = 0.4) + themes_ggplot+ geom_smooth(method='lm', se=F, colour ="black")+
facet_wrap(~Project)+
stat_cor(method = "pearson", label.x.npc = "left", label.y.npc = "top") + scale_color_manual(values=c("blue","red"), name = "Group:") +
ylab("Interferon-Stimulated Genes Score")+ xlab ("ADAR1 Normalized Expression (TPM)")
corr_ISG_ADAR
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 51 rows containing non-finite values (stat_smooth).
## Warning: Removed 51 rows containing non-finite values (stat_cor).
## Warning: Removed 51 rows containing missing values (geom_point).

out_path <- paste0(OUT_DIR,'/',"corr_ISG_ADAR.pdf")
ggsave(out_path, corr_ISG_ADAR, width = 10, height = 6)
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 51 rows containing non-finite values (stat_smooth).
## Warning: Removed 51 rows containing non-finite values (stat_cor).
## Warning: Removed 51 rows containing missing values (geom_point).
corr_ISG_Alu <- df_combined %>%
ggplot(aes(x=A2GEditingIndex_Alu, y=ISG38_score))+
geom_point(aes(color=Group),size=3, alpha = 0.4) +
themes_ggplot+ geom_smooth(method='lm', se=F, colour ="black")+ facet_wrap(~Project)+
stat_cor(method = "pearson", label.x.npc = "left", label.y.npc = "top") + scale_color_manual(values=c("blue","red"), name = "Group:") +
xlab("Interferon-Stimulated Genes Score")+ ylab (" ALU Editing Index")
corr_ISG_Alu
## `geom_smooth()` using formula 'y ~ x'

out_path <- paste0(OUT_DIR,'/',"corr_corr_ISG_Alu.pdf")
ggsave(out_path, corr_ISG_ADAR, width = 10, height = 6)
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 51 rows containing non-finite values (stat_smooth).
## Warning: Removed 51 rows containing non-finite values (stat_cor).
## Warning: Removed 51 rows containing missing values (geom_point).